#include "udpClient.hpp"
#include <iostream>
#include <memory>
#include <cstdlib>
using namespace Client;
inline void Usage(const string& proc)
{
    cout << "usage: \n\t" << proc << "local_ip port" << endl; 
}


int main(int argc, char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    string serverIp = argv[1];
    uint16_t serverPort = atoi(argv[2]);
    shared_ptr<udpClient> udp(new udpClient(serverIp, serverPort));
    udp->initClient(); 
    udp->run();
    return 0;
}